package com.bor.gb.db.domain;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;

@Document
public class Guide {

    @Id
    private String id;

    private String url;

    private String description;

    private String name;

    private List<String> plusIds = new ArrayList<String>();

    private List<String> minusIds = new ArrayList<String>();

    private Set<PlaceNote> entries;

    @DBRef
    private Place place;

    @DBRef
    private User user;

    public Set<PlaceNote> getEntries() {
        return entries;
    }

    public void setEntries(Set<PlaceNote> entries) {
        this.entries = entries;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Place getPlace() {
        return place;
    }

    public void setPlace(Place place) {
        this.place = place;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public List<String> getPlusIds() {
        return plusIds;
    }

    public List<String> getMinusIds() {
        return minusIds;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }


    @Override
    public String toString() {
        return "Guide{" +
                "id='" + id + '\'' +
                ", url='" + url + '\'' +
                ", description='" + description + '\'' +
                ", name='" + name + '\'' +
                ", plusIds=" + plusIds +
                ", minusIds=" + minusIds +
                ", entries=" + entries +
                ", place=" + place +
                ", user=" + user +
                '}';
    }
}
